<{include file="shop_header.htm"}>
<div class="menu_bottom L1">
  <div class="headtop_L"> <{$lang.you_are_here}><a href='<{$config.weburl}>/'><{$lang.indexpage}></a> &raquo; 购物车 </div>
</div>
<div id="mainbody1" class="m1">
  <table width="100%" border="0" cellspacing="1" bgcolor="#BAD9EF" class="order_table">
    <tr>
      <td width="16%" height="1" bgcolor="#BAD9EF">店铺产品</td>
      <td width="25%" height="1" bgcolor="#BAD9EF">单价(元)</td>
      <td width="18%" height="1" bgcolor="#BAD9EF">数量</td>
      <td width="30%" height="1" bgcolor="#BAD9EF">小计</td>
      <td width="11%" bgcolor="#BAD9EF">&nbsp;</td>
    </tr>
    </table>
      <table width="100%" border="0" cellspacing="1" class="order_table"/>     
     <{foreach item=list from=$cart}>  
             <{if !empty($list.company)}>            
            <tr>
              <td colspan="5" bgcolor="#DDDDDD" style="font-weight:bold;" scope="col">卖家：<a href="<{$config.weburl}>/shop.php?uid=<{$list.company.sell_userid}>"><{$list.company.company}></a>公司，电话：<{$list.company.tel}> </td>
            </tr>
            <{/if}>
            <{foreach item=pro  from=$list.prolist}>
            <tr>
              <td bgcolor="#FFFFFF" scope="col">
              <a href="<{$config.weburl}>/?m=product&s=product_detail&id=<{$pro.pid}>">
              <{assign var="img" value=$pro.pic.0}>
			  <{html_image file=uploadfile/product/$img width=80 height=80}>
              </a>
              <br /><{$pro.pname}>
              </td>
              <td bgcolor="#FFFFFF"><{$config.money}><{$pro.price|number_format:2}>元</td>
              <td bgcolor="#FFFFFF">
              
                <a   href="<{$config.weburl}>/?m=product&s=cart&id=<{$pro.id}>&cgnum=<{$pro.num-1}>">-</a>
                <input name="nums" id="nums" readonly="readonly" onchange="check_nums();" type="text" size="5" value="<{$pro.num}>" />
                <a href="<{$config.weburl}>/?m=product&s=cart&id=<{$pro.id}>&cgnum=<{$pro.num+1}>">+</a>(库存：<{$pro.amount}>件)
                 <script>
                 function check_nums()
				 {
				 	var v=$('nums').value*1;
				 	if(!v)
						$('nums').value=1;
					if(v><{$pro.amount}>*1)
					{
						$('nums').value=<{$pro.amount}>*1;
						return false;
					}
				 }
                 </script>
                </td>
              <td bgcolor="#FFFFFF"><{$config.money}><{$pro.sumprice|number_format:2}>元</td>
              <td align="center" bgcolor="#FFFFFF"><a href="<{$config.weburl}>/?m=product&s=cart&deid=<{$list.company.id}>">删除</a></td>
            </tr>
             <{/foreach}>
       
     <{/foreach}>
      </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td align="right">商品总价：<{$config.money}><{$cart.sumprice|number_format:2}>元
      <input name="" type="button" onclick="javascript:window.location='<{$config.weburl}>/?m=product&s=cart&clear=1';" value="清空购物车" />
        <input name="" type="button" onclick="javascript:window.location='<{$config.weburl}>/?m=product&s=confirm_order';" value="结算" /></td>
    </tr>
  </table>  
</div>
<{include file="shop_footer.htm"}>